fix(load): unblock first load of an absent extension - #54
Conversation
- classify Designer's "Конфигурация 'Расширение конфигурации' недоступна" as NotSupported, so `load --mode load` proceeds on the first load of an extension the infobase does not carry yet instead of failing the compatibility probe with `failed to determine infobase compatibility state` - switch the probe classifier to Unicode `to_lowercase`; `to_ascii_lowercase` leaves Cyrillic untouched, so every Russian branch silently never matched a capitalised platform diagnostic - cover the absent-extension wording in ru and en, and keep unrelated extension probe failures classified as Unknown
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughКлассификатор ошибок пробирования теперь корректно обрабатывает Unicode-регистр и дополнительные английские и русские сообщения о недоступных расширениях. Тесты проверяют состояние ChangesКлассификация ошибок пробирования
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR narrowly expands compatibility-error classification so the first load of an absent extension can proceed; no actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The very first
loadof an extension that the infobase does not carry yet fails on the compatibility probe:Exit code
2, resultartifact_load_failed. The main configuration is already loaded into a fresh file infobase at this point; only the extension is missing.Reproduced on platform
8.3.27.2130, v8-runner0.5.1(7ce1b06, currentmaster).Downstream report: IngvarConsulting/unica#355
Root cause
loadalways runsprobe_compatibilitybefore applying the artifact. For a.cfeit runs DesignerWhen
<NAME>is not in the infobase, Designer exits non-zero withclassify_probe_failurethen returnsUnknown, whichprobe_compatibilityturns intoAppError::Validation. Two independent gaps combine here, and both must be closed for the scenario to work:to_ascii_lowercase()does not lowercase Cyrillic. It only mapsA-Z, so"Расширение"never matches the literal"расширен". Every Russian branch of the classifier —не найден,не поддерж, andподдерж/поставщикon the configuration side — is unreachable whenever the platform capitalises the word, which it does. Verified:No vocabulary for the absent-extension wording. The classifier recognises only
not found/не найденandnot supported/unsupported/не поддерж. The platform says недоступна ("unavailable").An extension missing from the infobase is the normal state before the first load, so it should classify as
NotSupported:validate_probe_mode_compatibility(LoadMode::Load, NotSupported)returnsNoneand the load proceeds.Change
classify_probe_failureuses Unicodeto_lowercase().недоступ/unavailable/not availableas absent, alongside the existing not-found and unsupported wording.absent/unsupportedpredicates; behaviour for previously recognised wording is unchanged.This only widens classification of a probe that has already exited non-zero — a successful compare still returns
Supportedbefore reaching the classifier.Tests
Three unit tests on
classify_probe_failure:NotSupported;NotSupported;Unknown, so the widened wording cannot silently mask a real failure.The first two fail on
masterbefore the change (left: Unknown, right: NotSupported).Verification
Run on
7ce1b06before and after the change:masterThe 44 failures are pre-existing and environmental on this machine (no 1C platform installed); the sorted list of failing test names is identical before and after, so nothing regressed.
cargo test --bin v8-runner load_artifactis fully green (15/15).cargo fmt --checkpasses, andcargo clippyreports no new warnings in the changed region.I could not run the live-platform scenario end to end here — I have no 1C platform on this machine — so the platform-side confirmation is the reproduction in the linked downstream issue.
Summary by CodeRabbit
Исправления
Тесты